package com.kai.steering.data.service.entity.domainObject;

import cn.hutool.core.bean.BeanUtil;
import com.kai.steering.data.service.entity.po.WarehouseTest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ToString
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "WarehouseDO对象", description = "仓库业务实体")
public class WarehouseTestDO {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "仓库id")
    private String warehouseId;
    @ApiModelProperty(value = "试卷id")
    private String testId;
    @ApiModelProperty(value = "试卷名")
    private String testName;
    @ApiModelProperty(value = "id")
    private String id;
    public WarehouseTestDO(String warehouseId,String testId){
        this.warehouseId=warehouseId;
        this.testId=testId;
    }
    public WarehouseTestDO(WarehouseTest warehouseTest){
        convertWarehouseTestDO(warehouseTest);

    }

    public WarehouseTestDO(String warehouseId, TestDO testDO) {
        testId=testDO.getTestId();
        testName=testDO.getTestName();
        this.warehouseId=warehouseId;
    }

    public WarehouseTestDO convertWarehouseTestDO(WarehouseTest warehouseTest){
        BeanUtil.copyProperties(warehouseTest, this);
        return this;
    }
}
